<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>新增安全检查表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../../../css/public.css" media="all"/>
    <link rel="stylesheet" href="../../common/zTreeStyle.css"/>
    <link rel="stylesheet" href="add.css"/>
</head>

<body class="childrenBody" style="background: white;">
<div class="topsty">
    <div style="display: inline;">
				<span style="font-size: 15px;">
					<i class="layui-icon" style="color: #1E9FFF;margin:0 10px 0 30px;">&#xe65b;</i>
					<span id="pageTitle">上传试题</span>
				</span>
    </div>
    <div class="backtit" style="top: -5px;">
        <div class="back_san"></div>
        <a onclick="history.go(-1)" class="layui-btn layui-btn-normal">返回</a>
    </div>
</div>
<div class="body">
    <form class="layui-form" style="margin-top: 14px;margin-bottom: 15px;">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">业务分类</label>
                <div class="layui-input-inline">
                    <select id="differServ">
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">试题分类</label>
                <div class="layui-input-inline">
                    <select id="typeName">
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">题型</label>
                <div class="layui-input-inline">
                    <select id="questionType" lay-filter="questionType">
                        <option value="0">单选题</option>
                        <option value="1">多选题</option>
                        <option value="2">判断题</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">题干</label>
            <div class="layui-input-block">
                <textarea id="title" placeholder="请输入题干" class="layui-textarea"></textarea>
                <!--<input id="fileId" type="file">-->
                <button type="button" class="layui-btn layui-btn-normal file"  id="fileId">选择图片</button>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">选项</label>
            <div class="layui-input-block option">
                <label></label><input type="checkbox" name="option" lay-skin="primary" class="check">
                <span class="type_option">
							<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题"
                                   class="layui-input option_input">
							<span>正确</span>
						</span>
                <i class="seraph icon-guanbi"></i>
                <span class="true">【正解】</span>
                <button type="button" class="layui-btn layui-btn-normal file">选择图片</button>
            </div>
            <div class="layui-input-block option">
                <label></label><input type="radio" name="option" lay-skin="primary" class="check">
                <span class="type_option">
							<input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="请输入标题"
                                   class="layui-input option_input">
							<span>错误</span>
						</span>
                <i class="seraph icon-guanbi"></i>
                <span class="true">【正解】</span>
                <button type="button" class="layui-btn layui-btn-normal file">选择图片</button>
            </div>

            <div class="add_option">
                <div class="box">
                    <div class="rctd-add"></div>
                    添加选项
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">解析</label>
            <div class="layui-input-block">
                <textarea id="parse" placeholder="请填写题目解析、思路解释，便于后期交流、讨论，不会显示给考生。（选填）" class="layui-textarea"></textarea>
                <button type="button" class="layui-btn layui-btn-normal file"  id="parseFileId">选择图片</button>

            </div>
            <div class="commit">提交</div>
        </div>
    </form>

</div>
<script type="text/javascript" src="../../common/jquery.min.js"></script>
<script type="text/javascript" src="../../common/config.js"></script>
<script type="text/javascript" src="../../../layui/layui.js"></script>
<script type="text/javascript" src="../../common/jquery.ztree.core.js"></script>
<script type="text/javascript" src="../../common/jquery.ztree.excheck.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script type="text/javascript" src="add.js"></script>

<script>
    layui.use(['form', 'layedit', 'laydate'], function () {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate;

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function (value) {
                if (value.length < 5) {
                    return '标题至少得5个字符啊';
                }
            }
            , pass: [/(.+){6,12}$/, '密码必须6到12位']
            , content: function (value) {
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function (data) {
            layer.msg('开关checked：' + (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function (data) {
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });

    });


</script>
</body>

</html>